package service;

import pojo.OrderDetail;
import pojo.OrderGoodsInfo;

import java.util.List;

public interface IOrderService {
    /**
     * 向订单详情表中添加数据
     *
     * @param orderDetail
     * @return
     */
    boolean addToOrderDetail(OrderDetail orderDetail);

    /**
     * 向订单-商品映射表中添加数据
     *
     * @param orderGoodsInfo
     * @return
     */
    boolean addToOrderGoodsInfo(OrderGoodsInfo orderGoodsInfo);

    /**
     * 根据订单id从订单详情表中查询数据
     *
     * @param id
     * @return
     */
    OrderDetail queryOrderDetailById(String id);

    /**
     * 根据订单id从订单-商品映射表中查询数据
     *
     * @param oid
     * @return
     */
    List<OrderGoodsInfo> queryOrderGoodsInfosById(String oid);

    /**
     * 根据用户id查询订单
     *
     * @param uid
     * @return
     */
    List<OrderDetail> queryOrderDetailsByUid(int uid);
}
